<template>
  <div>
    <unlock-filter @on-filter="submitFilterForm" />
    <el-table :data="tableData.list" v-loading="loading" element-loading-text="加载中...">
      <el-table-column label="账户名" prop="account"></el-table-column>
      <el-table-column label="账户类型" prop="type">
        <template slot-scope="{row}">
          {{getLabel(row.type,consts.ACCOUNT_TYPE)}}
        </template>
      </el-table-column>
      <el-table-column label="解锁原因" prop="lockReason">
        </el-table-column>
      <el-table-column label="解锁时间" prop="lockTime">
        <template slot-scope="{row}">
          {{row.lockTime | toTime}}
        </template>
      </el-table-column>
      <el-table-column label="申请人" prop="lockBy"></el-table-column>
    </el-table>
    <div class="pagination-container">
      <el-pagination background @size-change="gridSizeChange" @current-change="gridCurrentChange"
                     :current-page="filters.page" :page-sizes="gridPageSize" :page-size="filters.size"
                     :layout="gridLayout" :total="tableData.total">
      </el-pagination>
    </div>
  </div>

</template>

<script>

  import {getMemberLockLogs} from "@/services/api/member";
  import FormFilter from "./formFilter";
  import {grid,constsLabel} from '@/build'
  import UnlockFilter from "@/views/member/lockLogs/unlockFilter";
  export default {
    name: "unlock-logs",
    components: {UnlockFilter, FormFilter},
    mixins:[grid,constsLabel],
    data() {
      return {
        tableData: {},
        auditStep: 0,
        rowData:{},
        filters: {
          lock_state: 2
        },
      }
    },
    methods:{
      submitFilterForm(formInline) {
        const _formInline = Object.assign(this.filters, formInline)
        this.filters = _formInline;
        this.gridSearch()
      }
    },
    mounted(){
      this.bindGet(getMemberLockLogs, 'tableData', {
        action: 'getGrid',
        sendingData: 'filters'
      });
      this.getAll()

    }
  }
</script>

<style scoped>

</style>
